package com.foundersoftware.commons.organization;

import com.foundersoftware.commons.organization.model.Employee;
import com.foundersoftware.commons.organization.model.OrganizationUnit;

public class OrganiztionDemo {
    public OrganiztionDemo() {
    }

    public static void main(String[] args)
    {
        OrganizationManagerFactory orgMgrFactory = new OrganizationManagerFactory();
        orgMgrFactory.initialize();
        OrganizationManager orgMgr = orgMgrFactory.createOrganizationManager();

        Employee employee = new Employee();
        employee.setId("1308");
        employee.setDisplayName("wuhongjun");
        orgMgr.createEmployee(employee);
        employee.setId("1309");
        employee.setDisplayName("wuyong");
        orgMgr.createEmployee(employee);

      OrganizationUnit orgUnit = new OrganizationUnit();
      orgUnit.setId("001");
      orgUnit.setName("jinglunruanjian");
      orgMgr.createOrganizationUnit(orgUnit);
      OrganizationUnit orgUnit1 = new OrganizationUnit();
      orgUnit.setId("001");
      orgMgr.deleteOrganizationUnit(orgUnit1);
    }
}
